package com.hitales.liteflow.liteflowdemo.contextdemo;

import com.yomahub.liteflow.annotation.LiteflowComponent;
import com.yomahub.liteflow.core.NodeComponent;

@LiteflowComponent("contextb")
public class BComponent extends NodeComponent {

    @Override
    public void process() {
        CustomContext context = this.getContextBean(CustomContext.class);

        System.out.println("B组件读取数据: userId=" + context.getUserId() + ", age=" + context.getAge());

        // 修改数据
        context.setAge(context.getAge() + 1);
    }
}

